package com.mt.repair.entity.repairManagement;

import javax.persistence.*;
import java.io.Serializable;
import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import com.mt.common.system.entity.User;

@DEntity(label="维修评价",comment="",moduleLabel="报修管理")
@Entity(name="repair_repair_evaluate")
@Table(name = "repair_repair_evaluate" , indexes = { @Index(name = "index_repair_order_id", columnList = "repair_order_id"),@Index(name = "index_user_id", columnList = "user_id"),@Index(name = "index_repair_user_id", columnList = "repair_user_id"),@Index(name = "index_repair_applicant_id", columnList = "repair_applicant_id")  })
@ApiModel(description = "维修评价:")
public class RepairEvaluate extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单",component="文本",where=true)
	@ApiModelProperty(value = "维修单:维修单")
	@Column(name="repair_order_id",length=255,nullable=false,unique=false)
	private Long repairOrderId;

	@Transient
	private RepairOrder repairOrder;

	@Transient
	@ApiModelProperty(value = "维修单名称:维修单")
	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单")
	private String repairOrderName;

	@Transient
	@ApiModelProperty(value = "维修单编号:维修单编号")
	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单")
	private String repairOrderCode;

	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户",component="对象选择",where=true)
	@ApiModelProperty(value = "用户:用户")
	@Column(name="user_id",length=255,nullable=false,unique=false)
	private Long userId;

	@Transient
	private User user;

	@Transient
	@ApiModelProperty(value = "用户名称:用户")
	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户")
	private String userName;
	@Transient
	@ApiModelProperty(value = "用户昵称:用户")
	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户")
	private String userNickname;
	@Transient
	@ApiModelProperty(value = "用户头像:用户")
	@DColumn(index=4,label="用户",foreignEntity="User",comment="用户")
	private String userAvatar;

	@DColumn(index=5,label="维修员",foreignEntity="User",comment="维修员",component="对象选择",where=true)
	@ApiModelProperty(value = "维修员:维修员")
	@Column(name="repair_user_id",length=255,nullable=false,unique=false)
	private Long repairUserId;

	@Transient
	private User repairUser;

	@Transient
	@ApiModelProperty(value = "维修员名称:维修员")
	@DColumn(index=5,label="维修员",foreignEntity="User",comment="维修员")
	private String repairUserName;

	@Transient
	@ApiModelProperty(value = "维修员昵称:维修员")
	@DColumn(index=5,label="维修员",foreignEntity="User",comment="维修员")
	private String repairUserNickname;

	@DColumn(index=6,label="报修人",foreignEntity="User",comment="报修人",component="对象选择",where=true)
	@ApiModelProperty(value = "报修人:报修人")
	@Column(name="repair_applicant_id",length=255,nullable=false,unique=false)
	private Long repairApplicantId;

	@Transient
	private User repairApplicant;

	@Transient
	@ApiModelProperty(value = "报修人名称:报修人")
	@DColumn(index=6,label="报修人",foreignEntity="User",comment="报修人")
	private String repairApplicantName;

	@DColumn(index=7,label="评价等级",comment="评价等级",component="数字,整数",where=true)
	@ApiModelProperty(value = "评价等级:评价等级")
	@Column(name="evaluate_grade",length=255,nullable=false,unique=false)
	private Integer evaluateGrade;


	@DColumn(index=8,label="评价内容",comment="评价内容",component="文本",where=false)
	@ApiModelProperty(value = "评价内容:评价内容")
	@Column(name="evaluate_content",length=255,nullable=true,unique=false)
	private String evaluateContent;


	public Long getRepairOrderId() {
		return this.repairOrderId;
	}

	public void setRepairOrderId(Long repairOrderId) {
		this.repairOrderId = repairOrderId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getRepairUserId() {
		return this.repairUserId;
	}

	public void setRepairUserId(Long repairUserId) {
		this.repairUserId = repairUserId;
	}

	public Long getRepairApplicantId() {
		return this.repairApplicantId;
	}

	public void setRepairApplicantId(Long repairApplicantId) {
		this.repairApplicantId = repairApplicantId;
	}

	public Integer getEvaluateGrade() {
		return this.evaluateGrade;
	}

	public void setEvaluateGrade(Integer evaluateGrade) {
		this.evaluateGrade = evaluateGrade;
	}

	public String getEvaluateContent() {
		return this.evaluateContent;
	}

	public void setEvaluateContent(String evaluateContent) {
		this.evaluateContent = evaluateContent;
	}

	public RepairOrder getRepairOrder() {
		return this.repairOrder;
	}

	public void setRepairOrder(RepairOrder repairOrder) {
		if(repairOrder == null){
		}
		else
		{
		this.repairOrderId = repairOrder.getEid();
		this.repairOrder = repairOrder;		
		}
}

	public String getRepairOrderName() {
		return this.repairOrderName;
	}

	public void setRepairOrderName(String repairOrderName) {
		this.repairOrderName = repairOrderName;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		if(user == null){
		}
		else
		{
		this.userId = user.getEid();
		this.user = user;		
		}
}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public User getRepairUser() {
		return this.repairUser;
	}

	public void setRepairUser(User repairUser) {
		if(repairUser == null){
		}
		else
		{
		this.repairUserId = repairUser.getEid();
		this.repairUser = repairUser;		
		}
}

	public String getRepairUserName() {
		return this.repairUserName;
	}

	public void setRepairUserName(String repairUserName) {
		this.repairUserName = repairUserName;
	}

	public User getRepairApplicant() {
		return this.repairApplicant;
	}

	public void setRepairApplicant(User repairApplicant) {
		if(repairApplicant == null){
		}
		else
		{
		this.repairApplicantId = repairApplicant.getEid();
		this.repairApplicant = repairApplicant;		
		}
}

	public String getRepairApplicantName() {
		return this.repairApplicantName;
	}

	public void setRepairApplicantName(String repairApplicantName) {
		this.repairApplicantName = repairApplicantName;
	}


	public String getUserAvatar() {
		return userAvatar;
	}

	public void setUserAvatar(String userAvatar) {
		this.userAvatar = userAvatar;
	}

	public String getRepairOrderCode() {
		return repairOrderCode;
	}

	public void setRepairOrderCode(String repairOrderCode) {
		this.repairOrderCode = repairOrderCode;
	}

	public String getUserNickname() {
		return userNickname;
	}

	public void setUserNickname(String userNickname) {
		this.userNickname = userNickname;
	}

	public String getRepairUserNickname() {
		return repairUserNickname;
	}

	public void setRepairUserNickname(String repairUserNickname) {
		this.repairUserNickname = repairUserNickname;
	}
}
